package com.tarena.day0914;
import java.util.Arrays;

public class A {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		int[] ary={9,3,5,7,1};
		selectSort(ary);
		System.out.println(Arrays.toString(ary));
	}
	
	public static void selectSort(int[] ary){
		for(int i=0;i<ary.length-1;i++){
			for(int j=i+1;j<ary.length;j++){
				if(ary[i]>ary[j]){
				int temp =ary[i];
				ary[i]=ary[j];
				ary[j]=temp;
				}
			}
		}
	}

}
